package a02;

import java.awt.Color;
import java.rmi.RemoteException;

public class OthelloControl extends RegularControl<OthelloMove> implements
	Constants {

    private static final long serialVersionUID = 1L;

    public OthelloControl() {
	this(new Othello());
    }

    public OthelloControl(boolean visible) {
	this(new Othello(), 0, visible);
    }

    public OthelloControl(Othello ttt) {
	this(ttt, 0, true);
    }

    public OthelloControl(Othello ttt, int kiLevel, boolean visible) {
	super(ttt, "Othello", kiLevel, visible);
	super.getBoard().setPlayerColors(Color.WHITE, "WEISS", Color.BLACK,
		"SCHWARZ");
	super.getBoard().setTableColor(11, 116, 0);
	super.getBoard().setGrid(new Color(0, 69, 2), 1);
	refresh();
    }

    @Override
    public Othello getNewGame() {
	return new Othello();
    }

    @Override
    public void whenMousePressed(byte c, byte r) throws RemoteException {
	super.whenMousePressed(c, r);
	if (OTHELLO_LASTMOVE_PAINTING_DISABLED)
	    getBoard().setLastMove(null);
    }
}
